{% load i18n %}
<div class="pager">
    {% if has_previous %}
    <span class="page">
        <a href="{{ request.path }}?page={{ previous }}&{{ url_arguments.encode_without_page }}">&lt; Prev</a>
    </span>
    {% endif %}

    {% if show_first %}
        <span class="page"><a href="{{ request.path }}?page=1&{{ url_arguments.encode_without_page }}">1</a></span>
        <span class="ellipsis">...</span>
    {% endif %}
    {% for linkpage in page_numbers %}
        {% ifequal linkpage page_num %}
         <span class="current">{{ page_num }}</span>
          {% else %}
           <span class="page"><a href="{{ request.path }}?page={{ linkpage }}&{{ url_arguments.encode_without_page }}">{{ linkpage }}</a></span>
          {% endifequal %}
    {% endfor %}
    {% if show_last %}
        <span class="ellipsis">...</span>
        <span class="page"><a href="{{ request.path }}?page={{ last_page }}&{{ url_arguments.encode_without_page }}">{{ last_page }}</a></span>
    {% endif %}
    {% if has_next %}
        <span class="page"><a href="{{ request.path }}?page={{ next }}&{{ url_arguments.encode_without_page }}">Next &gt;</a></span>
    {% endif %}
</div>